<!doctype html>
<html lang="en">
 <head>
  <meta charset="UTF-8">
  <meta name="Generator" content="EditPlus®">
  <meta name="Author" content="">
  <meta name="Keywords" content="">
  <meta name="Description" content="">
  <title>Document</title>
  <script src="jquery-1.11.3.min.js"></script>
 </head>
 <body>
    <div title="div_1">AAAAA</div>
	<div>BBBBB</div>
	<div>CCCCC</div>
	<p>DDDDD</p>
	<div> <span>11111</span></div>
	<input type="text" value="ABCD"><br>
	A<input type="checkbox">  
	B<input type="checkbox">  
    C<input type="checkbox"> <br>
	<button>全选</button> <button>全不选</button>
 </body>
 <script>
  //console.log($("div:first").attr("title"));
  //$("div").attr("name","div_name");
  //$("div").removeAttr("title");
  //$("div").addClass("div_class");
  //$("div").addClass("abc");
  //$("div").removeClass("div_class");
  //console.log($("div:last").html());
  //$("div:first").html("<h1>hhhhhhhh</h1>");
  //console.log($("input:text").val());
  //$("input:text").val("abcd");
  var $_checkbox = $("input:checkbox");
  $("button").eq(0).click(function(){
     $_checkbox.prop("checked",true);
  });

  $("button").eq(1).click(function(){
     $_checkbox.prop("checked",false);
  });

 </script>
</html>
